package sample.innerCls;

public class Parcel2 {

	public Dest dest(String s) {
		
		//implements interface inside  another class
		class PDest implements Dest {

			private String label;

			private PDest(String whereTo) {
				this.label = whereTo;
			}

			@Override
			public String ReadLabel() {
				return this.label;
			}

		}

		return new PDest(s);
	}

	public static void main(String[] args) {
		Parcel2 p = new Parcel2();
		Dest d = p.dest("Anqing");
	}
}
